#include <iostream>
#include "interfaces/context/ICharkaContext.h"
#include "implementations/RenderSystem.h"
#include "implementations/KeyManager.h"
#include "SDL.h"

int main()
{
	vnav::graphics::RenderSystem::initialize(500, 400, false);
	chakra::getChakraContext().getWorld().start();

	while(!vnav::graphics::RenderSystem::isWindowClosed())
	{
		vnav::graphics::RenderSystem::beginFrame();
// 		if (vnav::graphics::KeyManager::instance()->isKeyDown(vnav::graphics::KeyManager::KEY_A))
// 		{
// 			std::cout << "A Pressed\n";
// 		}
		chakra::getChakraContext().getWorld().doStep();
		vnav::graphics::RenderSystem::endFrame();
	}

	chakra::getChakraContext().getWorld().stop();
	vnav::graphics::RenderSystem::finalize();

	return 0;
}